<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function num() {
        let sum = 0
        for (let i = 0; i < arguments.length; i++) {
          let res = +prompt('请输入一个数')
          sum += arguments[i]
        }
        let num1 = Math.max(...arguments)
        let num2 = Math.min(...arguments)
        console.log(sum)
        console.log(num1)
        console.log(num2)
      }
      num(1, 3, 5, 7, 8, 9)
    </script>
  </body>
</html>
